/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package clases;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

/**
 *
 * @author Miguel_
 */
@Entity
@Table(name = "DIRECCION")
public class Direccion implements Serializable {
    
    private Integer id;
    private String calle; //calle con numero ej: Alcalá,1
    private String ciudad;
    private String pais;
    private String cp;
    
    public Direccion(){}
    
    public Direccion(String ca, String ci, String p, String cp )
    {
        this.calle = ca;
        this.ciudad = ci;
        this.cp = cp;
        this.pais = p;
    }

    @TableGenerator(
    name="DI_GEN",
    table="JPA_WXS_APP_SEQUENCE_GENERATOR",
    pkColumnName="GEN_KEY",
    valueColumnName="GEN_VALUE",
    pkColumnValue="DIRECCION_ID",
    allocationSize=1,
    initialValue= 0 )
    @Id
    @GeneratedValue(strategy=GenerationType.TABLE,generator="DI_GEN")
    @Column(name = "ID", nullable = false)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    
    @Column(name = "CALLE")
    public String getCalle() {
        return calle;
    }

    public void setCalle(String calle) {
        this.calle = calle;
    }

    @Column(name = "CIUDAD")
    public String getCiudad() {
        return ciudad;
    }

    public void setCiudad(String ciudad) {
        this.ciudad = ciudad;
    }

    @Column(name = "PAIS")
    public String getPais() {
        return pais;
    }

    public void setPais(String pais) {
        this.pais = pais;
    }

    @Column(name = "CP")
    public String getCp() {
        return cp;
    }

    public void setCp(String cp) {
        this.cp = cp;
    }

    
    
    
    
}
